<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
</head>
<script type="text/javascript">
	
//去重  
arr = [34,34,65,6555,34,8545,56,77,33,77,33,33,33,25,654];

function qc (x) {
	for (var i = 0; i < x.length; i++) {
		for (var j = i + 1; j <x.length ; j++) {
				if (x[i]==x[i+1]) {
					x.splice(j,1);
					j--;
				};
			};	
		};
	return x
}


res = qc(arr)

alert(res)

//排序


arr1 = [9,1,4,6,8]

function pxu (x) {
	for (var s = 0; s < x.length-1; s++) {
	for (var z = 0; z < x.length; z++) {
		
			
			if (x[z]>x[z+1]) {
				temp = x[z+1]
				x[z+1] = x[z]
				x[z] = temp
			};
		};
	};
	return x
}

res = pxu(arr1)

alert(res)

//
//
// //

// str = ""

</script>
<body>
	
</body>
</html>